<?php
	/* Here are all the main function of this site
	 * some other functions may be found in the code
	 * but they are only there becouse they are used
	 * only once!
	*/
	
// Parameter: array (String)
// This functions takes an array of error messages and prints them nicely on the screen
function getFeedback( $feedback ) {
	if( !count( $feedback ) )
	{
		return '';
	}
	else
	{
		$ret = '<div id="ui-widget"><div class=ui-state-error ui-corner-all" style="padding: 0 .7em;">  <ul>';
		foreach( $feedback as $f )
		{
			$ret .= '<span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span><p><strong>Error: </strong>' . $f . '</p>';	
		}
		$ret .= ' </div</div>';
		
		unset($_SESSION['feedback']);
		session_unregister($feedback); 
		
		return $ret;
	}
	

	
}